<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace common\traits;

/**
 * Description of Constants
 *
 * @author emhome
 */
trait User {

    /**
     * 用户基本信息
     * @return user
     */
    public function getUser() {
        return $this->hasOne(\common\models\User::className(), ['id' => 'user_id']);
    }

    public function getUsers() {
        return $this->hasOne(\common\models\Users::className(), ['id' => 'user_id']);
    }

}
